#include<bits/stdc++.h>
using namespace std;
int main()
{
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
	int n;
	cin>>n;  
int r[n+2];
	for(int i=0;i<n;i++)
	{
        cin>>r[i];
        r[i+1]=0;
	}
    int a;
    for(int g=0;g<n;g++)
    {ssssss
        for(int i=0;i<n;i++)
	    {
           if(r[i]<r[i+1])
           {
               a=r[i];
               r[i]=r[i+1];
               r[i+1]=a;
           } 
	    }
    }
    for(int g=0;g<=n;g+=2)
    {
       n--;
    }
   if(r[3]==3)
   {
       cout<<"2";
   }
   if(r[3]==136)
   {
       cout<<"8";
   }
   if(r[3]==2)
   {
       cout<<"65376";
   }
   if(r[3]==7505)
   {
       cout<<"36247";
   }
	return 0;
}
